<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

//登陆
Route::any('/login', "LoginController@login");
//注册
Route::any('/register', "LoginController@register");
//重置密码
Route::any('/resetUserPassword', "LoginController@resetUserPassword");


//获取验证码
Route::any('/getVerifyCode', "LoginController@getVerifyCode");

//获取图片
Route::any('/getPicture', "PictureController@getPicture");

//首页
Route::any('/getHomePageInfo', "UserController@getHomePageInfo");

//获取云课堂列表
Route::any('/getCloudLessonList', "CloudLessonController@getCloudLessonList");
//获取单堂课
Route::any('/getOneCloudLessonById', "CloudLessonController@getOneCloudLessonById");

//获取文章列表
Route::any('/getArticleList', "ArticleController@getArticleList");
//获取单个文章
Route::any('/getOneArticleById', "ArticleController@getOneArticleById");
//分享成功后的回调地址
Route::any('/shareLessonCallBack', "ShareController@shareLessonCallBack");

//验证登陆
Route::middleware(['auth:api'])->group(function () {

	//外教列表
	Route::any('/getAllTeacher', "TeacherController@getAllTeacher");
	//外教详情
	Route::any('/getTeacherDetail', "TeacherController@getTeacherDetail");
	//外教时间
	Route::any('/getTeaSchedule', "TeacherController@getTeaSchedule");

	//获取用户信息
	Route::any('/getUserInfo', "UserController@getUserInfo");

	//获取用户课程
	Route::any('/getUserLessonList', "UserController@getUserLessonList");

	//我的外教getMyTeacher
	Route::any('/getMyTeacher', "UserController@getMyTeacher");

	//进入课堂
	Route::any('/goToLessonRoom', "LessonController@goToLessonRoom");

	//用户提交建议  (上传文件)缺少上传文件
	Route::any('/addAdvice', "UserController@addAdvice");
});